﻿using System;
using System.ComponentModel;
using System.Xml.Serialization;

namespace Microsoft.WowAddonStudio.FrameXml.Serialization.LayoutFrames
{
    [Serializable]
    [DesignerCategory("code")]
    [XmlType(Namespace = "http://www.blizzard.com/wow/ui/")]
    [XmlRoot(Namespace = "http://www.blizzard.com/wow/ui/", IsNullable = false)]
    public class CheckButton : Button
    {
        /// <summary>
        /// Gets or sets a value indicating whether the check button is checked. The default is false.
        /// </summary>
        [XmlAttribute("checked")]
        [DefaultValue(false)]
        [Category("Appearance")]
        [Description("If set to true - checkbutton is checked when loaded. Default is false.")]
        public bool Checked
        {
            get { return Properties.GetValue<bool>("Checked"); }
            set { Properties.SetValue("Checked", value); }
        }

        /// <summary>
        /// Gets or sets the texture used for a checked check button.
        /// </summary>
        [XmlElement]
        [Category("Appearance")]
        [Description("Define the texture to use when a check button is checked.")]
        public Texture CheckedTexture
        {
            get { return Properties.GetValue<Texture>("CheckedTexture"); }
            set { Properties.SetValue("CheckedTexture", value); }
        }


        /// <summary>
        /// Gets or sets the texture used for a disabled and checked check button.
        /// </summary>
        [XmlElement]
        [Category("Appearance")]
        [Description("Define the texture to use when a check button is checked and disabled.")]
        public Texture DisabledCheckedTexture
        {
            get { return Properties.GetValue<Texture>("DisabledCheckedTexture"); }
            set { Properties.SetValue("DisabledCheckedTexture", value); }
        }

    }
}